home *** CD-ROM | disk | FTP | other *** search
-
-
-
- PPPPSSSSTTTTRRRReeeeaaaaddddIIIImmmmaaaaggggeeeeHHHHeeeeaaaaddddeeeerrrr((((3333)))) IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo PPPPSSSSTTTTRRRReeeeaaaaddddIIIImmmmaaaaggggeeeeHHHHeeeeaaaaddddeeeerrrr((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- PSTReadImageHeader, PSTWriteImageHeader - read/write printing specific
- STIFF image header
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<pppprrrriiiinnnnttttssssttttiiiiffffffff....hhhh>>>>
-
- iiiinnnntttt PPPPSSSSTTTTRRRReeeeaaaaddddIIIImmmmaaaaggggeeeeHHHHeeeeaaaaddddeeeerrrr((((SSSSTTTTSSSSttttrrrreeeeaaaammmm ****sssstttt,,,, PPPPSSSSTTTTIIIImmmmaaaaggggeeeeHHHHeeeeaaaaddddeeeerrrr ****hhhhdddd))));;;;
-
- iiiinnnntttt PPPPSSSSTTTTWWWWrrrriiiitttteeeeIIIImmmmaaaaggggeeeeHHHHeeeeaaaaddddeeeerrrr((((SSSSTTTTSSSSttttrrrreeeeaaaammmm ****sssstttt,,,, PPPPSSSSTTTTIIIImmmmaaaaggggeeeeHHHHeeeeaaaaddddeeeerrrr ****hhhhdddd,,,,
- iiiinnnntttt llllaaaasssstttt))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- These functions are similar to the generic _l_i_b_s_t_i_f_f functions
- _S_T_R_e_a_d_I_m_a_g_e_H_e_a_d_e_r and _S_T_W_r_i_t_e_I_m_a_g_e_H_e_a_d_e_r. They differ only in the amount
- of header information. The printing specific image header functions
- _P_S_T_R_e_a_d_I_m_a_g_e_H_e_a_d_e_r and _P_S_T_W_r_i_t_e_I_m_a_g_e_H_e_a_d_e_r use an image header structure
- that is a superset of the _S_T_I_m_a_g_e_H_e_a_d_e_r structure. The printing specific
- header contains additional printing specific information such as image
- resolution.
-
- Refer to the manual page for _S_T_R_e_a_d_I_m_a_g_e_H_e_a_d_e_r(_3) for information
- regarding the role of the image header in a STIFF stream.
-
- _P_S_T_R_e_a_d_I_m_a_g_e_H_e_a_d_e_r reads the image header information from the stream
- specified by _s_t and places the information in the image header structure
- specified by _h_d. _s_t must point to a STIFF stream open for reading.
- Following a successful call to _P_S_T_R_e_a_d_I_m_a_g_e_H_e_a_d_e_r, the function _S_T_R_e_a_d
- can be called to read the actual image data. The amount of image data
- available can be found in the _P_S_T_I_m_a_g_e_H_e_a_d_e_r structure. In addition,
- following a successful call to _P_S_T_R_e_a_d_I_m_a_g_e_H_e_a_d_e_r the TIFF tag list read
- from the STIFF stream can be queried using the _S_T_G_e_t_T_a_g function. Note
- that _P_S_T_R_e_a_d_I_m_a_g_e_H_e_a_d_e_r can be used to read a generic STIFF image header.
- If the additional information required for the printing specific header
- is not found in the stream, default values are placed in the
- _P_S_T_I_m_a_g_e_H_e_a_d_e_r fields for which information was not found in the STIFF
- stream as follows:
-
- PPPPSSSSTTTTIIIImmmmaaaaggggeeeeHHHHeeeeaaaaddddeeeerrrr ffffiiiieeeelllldddd DDDDeeeeffffaaaauuuulllltttt VVVVaaaalllluuuueeee
- ___________________________________________
- resUnit PST_RES_UNIT_INCH
- xRes 0
- yRes 0
- thresholding PST_THRESHOLD_NONE
- compression PST_COMPRESSION_NONE
- dataTime "" (empty string)
- hostComputer "" (empty string)
- software "" (empty string)
- docName "" (empty string)
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- PPPPSSSSTTTTRRRReeeeaaaaddddIIIImmmmaaaaggggeeeeHHHHeeeeaaaaddddeeeerrrr((((3333)))) IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo PPPPSSSSTTTTRRRReeeeaaaaddddIIIImmmmaaaaggggeeeeHHHHeeeeaaaaddddeeeerrrr((((3333))))
-
-
-
- pageNumbers 0, 0
- targetPrinter "" (empty string)
- driverOptions "" (empty string)
-
- After all the last image has been read from a STIFF stream, the next call
- to _P_S_T_R_e_a_d_I_m_a_g_e_H_e_a_d_e_r will return -1, and _S_T_e_r_r_n_o will be set to SSSSTTTTEEEEEEEEOOOOFFFF
- (see below).
-
- _P_S_T_W_r_i_t_e_I_m_a_g_e_H_e_a_d_e_r writes a printing specific image header to the STIFF
- stream specified by _s_t. Before a call to _P_S_T_W_r_i_t_e_I_m_a_g_e_H_e_a_d_e_r any caller
- specific TIFF tags should be added to the output tag list using the
- _S_T_A_d_d_T_a_g function. Following a successful call to _P_S_T_W_r_i_t_e_I_m_a_g_e_H_e_a_d_e_r the
- actual image data can be written to the stream using _S_T_W_r_i_t_e. The amount
- of image data that must be written to the stream is specified in the
- _P_S_T_I_m_a_g_e_H_e_a_d_e_r structure.
-
- Make sure that all fields of the PPPPSSSSTTTTIIIImmmmaaaaggggeeeeHHHHeeeeaaaaddddeeeerrrr structure passed to
- _P_S_T_W_r_i_t_e_I_m_a_g_e_H_e_a_d_e_r contain reasonable values; otherwise, garbage will be
- written into the STIFF stream.
-
- Note that following a successful call to _P_S_T_W_r_i_t_e_I_m_a_g_e_H_e_a_d_e_r the output
- TIFF tag list is cleared. A STIFF stream written using
- _P_S_T_W_r_i_t_e_I_m_a_g_e_H_e_a_d_e_r can be read using the generic _l_i_b_s_t_i_f_f image header
- reading function _S_T_R_e_a_d_I_m_a_g_e_H_e_a_d_e_r. The additional information in the
- stream will be placed on the tag list and may be queried using the
- _S_T_G_e_t_T_a_g function.
-
- The _P_S_T_I_m_a_g_e_H_e_a_d_e_r structure is defined as follows.
-
- typedef struct pst_imghdr {
- unsigned long width, height; /* Dimensions in dots */
- unsigned short bitsPerSample; /* Bits per channel */
- unsigned short samplesPerPixel; /* # of color channels */
- unsigned long imgbytes; /* Bytes of image data */
- STType type; /* Image data type */
- STPlane plane; /* Planar configuration */
- PSTResUnit resUnit; /* Resolution units */
- unsigned long xRes, yRes; /* Resolution, dots/resUnit */
- PSTThreshold thresholding; /* Dither mechanism */
- PSTCompression compression; /* Compression method */
- char *dateTime; /* Image time stamp */
- char *hostComputer; /* Computer used */
- char *software; /* Software used */
- char *docName; /* Document name */
- char *targetPrinter; /* Destination printer */
- unsigned short pageNumbers[2]; /* Page numbers */
- /* [0] = current page # */
- /* [1] = total pages */
- /* (0 = unknown) */
- char *driverOptions; /* Driver options */
- } PSTImageHeader;
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- PPPPSSSSTTTTRRRReeeeaaaaddddIIIImmmmaaaaggggeeeeHHHHeeeeaaaaddddeeeerrrr((((3333)))) IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo PPPPSSSSTTTTRRRReeeeaaaaddddIIIImmmmaaaaggggeeeeHHHHeeeeaaaaddddeeeerrrr((((3333))))
-
-
-
- TTTTIIIIFFFFFFFF TTTTAAAAGGGGSSSS UUUUSSSSEEEEDDDD
- The _P_S_T_W_r_i_t_e_I_m_a_g_e_H_e_a_d_e_r function will write the TIFF tags listed below
- into the STIFF stream. Any Caller specific tags added using _S_T_A_d_d_T_a_g(3)
- are written in addition to the tags listed. The tags are expressed in
- terms of their names in the header file _s_t_i_f_f._h. An '*' following a tag
- name indicates that this tag is not used in the generic STIFF stream.
-
- STBitsPerSample
- STCompression*
- STDateTime*
- STDocumentName*
- STHostComputer*
- STImageLength
- STImageWidth
- STNewSubfileType*
- STPageNumber*
- STPhotometricInterpretation
- STPlanarConfiguration
- STResolutionUnit*
- STSamplesPerPixel
- STSGIPrinting*
- STSoftware*
- STStripByteCounts
- STStripOffsets
- STTargetPrinter*
- STThresholding*
- STXResolution*
- STYResolution*
-
- RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
- Both _P_S_T_R_e_a_d_I_m_a_g_e_H_e_a_d_e_r and _P_S_T_W_r_i_t_e_I_m_a_g_e_H_e_a_d_e_r return 0 if execution was
- successful. -1 is returned and _S_T_e_r_r_n_o is set if an execution error has
- occurred.
-
- EEEEXXXXEEEECCCCUUUUTTTTIIIIOOOONNNN EEEERRRRRRRROOOORRRR CCCCOOOODDDDEEEESSSS
- _P_S_T_R_e_a_d_I_m_a_g_e_H_e_a_d_e_r will fail under the following circumstances.
-
- STEBADTAG Invalid TIFF tag.
-
- STENOMEM Out of memory.
-
- STEREADFROMWRITE Attempt to read from a write stream.
-
- STESYSCALL System call failed.
-
- STENEEDSEEK Operation requires seeking on a stream.
-
- STEEOF End of stream.
-
- _P_S_T_W_r_i_t_e_I_m_a_g_e_H_e_a_d_e_r will fail under the following circumstances.
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- PPPPSSSSTTTTRRRReeeeaaaaddddIIIImmmmaaaaggggeeeeHHHHeeeeaaaaddddeeeerrrr((((3333)))) IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo PPPPSSSSTTTTRRRReeeeaaaaddddIIIImmmmaaaaggggeeeeHHHHeeeeaaaaddddeeeerrrr((((3333))))
-
-
-
- STEBADTAG Invalid TIFF tag.
-
- STENOMEM Out of memory.
-
- STEWRITETOREAD Attempt to write to a read only stream.
-
- STESYSCALL System call failed.
-
- STENEEDSEEK Operation requires seeking on a stream.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- libstiff(3), STReadImageHeader(3), STAddTag(3)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-